﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Crude.VisualStudioAddin.Actions
{
    public abstract class BaseSolutionAction : IVSAction
    {
        public bool AddToSolution
        {
            get
            {
                return true;
            }

        }

        public bool AddToProject
        {
            get
            {
                return false;
            }
        }


        public abstract string Name
        {
            get;
        }

        public abstract string Caption
        {
            get;
        }

        public abstract string Tooltip
        {
            get;
        }

        public void GetActionStatus(EnvDTE80.DTE2 applicationObject, out bool visible, out bool enable, out string caption)
        {
            if (!applicationObject.Solution.IsOpen)
            {
                visible = false;
                enable = false;
                caption = null;
            }
            else
            {
                visible = true;
                enable = true;
                caption = null;
            }
        }

        public abstract void ExecuteAction(EnvDTE80.DTE2 applicationObject);


    }
}
